import javax.swing.JComponent;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;

public class ThreeButtonComponent extends JComponent
{
   public void paintComponent(Graphics g)
   {
      Graphics2D g2 = (Graphics2D) g;
      // your work here
      g2.setColor(Color.gray);
      g2.fill3DRect(50,50,50,50,true);
      g2.fill3DRect(110,50,50,50,true);
      g2.fill3DRect(170,50,50,50,true);
      g2.setColor(Color.red);
      g2.fillRoundRect(60,60,30,30,30,30);
      g2.setColor(Color.green);
      g2.fillRoundRect(120,60,30,30,30,30);
      g2.setColor(Color.cyan);
      g2.fillRoundRect(180,60,30,30,30,30);
   }
}